<html>
<body>
Reports <code>for</code> loops with a manually incremented index variable.
<p><code>for</code> loops with a manually incremented index variable can be simplified with the <code>withIndex()</code> function.</p>
<p><b>Use withIndex() instead of manual index increment</b> quick-fix can be used to amend the code automatically.</p>
<p>Example:</p>
<pre><code>
  fun foo(list: List&lt;String&gt;): Int? {
      var index = 0
      for (s in list) { &lt;== can be simplified
          val x = s.length * index
          index++
          if (x > 0) return x
      }
      return null
  }
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
  fun foo(list: List&lt;String&gt;): Int? {
      for ((index, s) in list.withIndex()) {
          val x = s.length * index
          if (x > 0) return x
      }
      return null
  }
</code></pre>
</body>
</html>
